package share

import "vrcm/src/vrcm/common/models"

type ShareRecord struct {
	models.Model

	TenantId   string `json:"tenant_id" gorm:"type:varchar(100);comment:租户"`
	BindId     string `json:"bind_id" gorm:"type:varchar(100);comment:分享的关联对象"`
	Password   string `json:"password" gorm:"type:varchar(100);comment:密码"`
	ObjectUuid string `json:"object_uuid" gorm:"type:varchar(200);comment:分享唯一id"`
	ExpireTime int64  `json:"expire_time" gorm:"type:int;comment:过期时间 -1为永久"`
	ShareType  int    `json:"share_type" gorm:"type:tinyint;comment:分享类型 1监看"`
	IsPassword int    `json:"is_password" gorm:"type:tinyint;comment:是否启用密码 1是 2否"`
	models.ModelTime
	models.ControlBy
}

func (ShareRecord) TableName() string {
	return "share_record"
}

func (e *ShareRecord) Generate() models.ActiveRecord {
	o := *e
	return &o
}

func (e *ShareRecord) GetId() interface{} {
	return e.Id
}
